
<div class="container">
{{ if isset(NoTokenData) }}
  <p>Not logged in. You can login <a href="/settings">here</a>.</p>
  <div class="component-header">
    <h2>Today's illustration rankings</h2>
    <a href="/ranking?content=all">See more</a>
  </div>
  <div class="artwork-container-scroll">
    {{ range NoTokenData.Contents }}
    <div class="artwork-small artwork">
      <div class="artwork-additional">
        <div class="artwork-position">{{ .Rank }}</div>
        {{ if toInt(.Pages) > 1 }}
        <div class="artwork-page-count"><span>&boxbox; {{ .Pages }}</span></div>
        {{ end }}
      </div>

      <a href="/artworks/{{ .ID }}">
        <img src="{{ .Image }}" alt="{{ .Title }}" />
      </a>
      <div class="artwork-title">
        <a href="/artworks/{{ .ID }}"> {{ .Title }} </a>
      </div>
      <div class="artwork-author">
        <a href="/users/{{ .ArtistID }}"
          ><img src="{{ .ArtistAvatar }}" alt="{{ .ArtistName }}" />
          <span>{{ .ArtistName }}</span></a
        >
      </div>
    </div>
    {{ end }}
  </div>

{{ else }}
  <div class="switcher">
    <span class="switch-title">Filter</span>
    <a href="/?mode=all" class="switch-button">All</a>
    <a href="/?mode=r18" class="switch-button">R-18</a>
  </div>
  <div class="component-header">
    <h2>Newest works by users you follow</h2>
    <a href="/self/followingWorks">See more</a>
  </div>
  <div class="artwork-container-scroll">
    {{ include "components/small-tn" Data.Following }}
  </div>
  <br />
  <h2>Recommended works</h2>
  <div class="artwork-container">
    {{ include "components/small-tn" Data.Recommended }}
  </div>
  <br />
  {{ range Data.RecommendByTags }}
  <h2>Recommended illustrations tagged <a href="/tags/{{.Name}}">#{{.Name}}</a></h2>
  <div class="artwork-container">
    {{ include "components/small-tn" .Artworks }}
  </div>
  <br />
  {{ end }}

{{ end }}
</div>
